<!DOCTYPE html>
<html>
<head lang="en">
    <meta charset="UTF-8">
    <title></title>
    <style>
        div{
           background-color: orange;
            width: 200px;
            height: 200px;
        }

    </style>
</head>
<body>

    <div class="div">11111</div>

    <script type="text/javascript">

        window.onload = function(){
//            alert('加载完毕')
        }

        window.onunload = function(){
//            alert('onunload')

        }

        var div = document.getElementsByClassName('div')[0]
        div.onmousedown = function(){//点击鼠标
            div.style.backgroundColor = 'green'
        }

        div.onmouseup = function(){

            div.style.background = 'url(img/icon_01.png)'
//            div.style.backgroundColor = 'orange'

        }



    </script>

</body>
</html>